package com.chenyue.cm.match.service.impl;


import com.chenyue.cm.base.dao.LcBaseMapper;
import com.chenyue.cm.base.service.BaseServiceImpl;
import com.chenyue.cm.match.dao.ex.MatchDataCenterMapperEx;
import com.chenyue.cm.match.domain.JdMatchScoreRecord;
import com.chenyue.cm.match.service.JdMatchScoreRecordService;
import com.chenyue.cm.match.vo.DataCenter;
import com.chenyue.cm.match.vo.JdMatchVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;


/**
 * @author chenyue-cm
 */
@Service(value = "JdMatchScoreRecordService")
public class JdMatchScoreRecordServiceImpl extends BaseServiceImpl<JdMatchScoreRecord> implements JdMatchScoreRecordService {

    private final MatchDataCenterMapperEx matchDataCenterMapper;

    public JdMatchScoreRecordServiceImpl(MatchDataCenterMapperEx matchDataCenterMapper) {
        this.matchDataCenterMapper = matchDataCenterMapper;
    }

    @Override
    @Resource(name = "jdMatchScoreRecordMapper")
    public void setBaseMapper(LcBaseMapper<JdMatchScoreRecord, Serializable> baseMapper) {
        this.baseMapper = baseMapper;
    }

    @Override
    public List<DataCenter> dataCenter(Integer type, Integer item, Integer createUser, Integer matchType, Integer matchGroup,
                                       Integer arrangeOrder, Integer province, Integer city, String date,Integer matchId, String convertPage) {
        return matchDataCenterMapper.dataCenterList(type, item, createUser, matchType,
                matchGroup, arrangeOrder, province, city, date, matchId, convertPage);
    }

    @Override
    public Integer dataCenterCount(Integer type, Integer item, Integer createUser, Integer matchType,
                                   Integer matchGroup, Integer arrangeOrder, Integer province, Integer city, String date,Integer matchId) {
        return matchDataCenterMapper.dataCenterCount(type, item, createUser,
                matchType, matchGroup, arrangeOrder, province, city, date,matchId);
    }

    @Override
    public List<JdMatchVo> selectMatchVo(Integer type,String starTime,String endTime,String s) {
        return matchDataCenterMapper.selectMatchVo(type,starTime,endTime,s);
    }

    @Override
    public List<JdMatchVo> selectMatchVoCount(Integer type,String starTime,String endTime) {
        return matchDataCenterMapper.selectMatchVoCount(type,starTime,endTime);
    }
}
